package com.aixin.csopuser.domain;

import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.time.Instant;
import java.time.LocalDate;
import java.util.Set;

@Data
@NoArgsConstructor
@Entity
@Table(name = "yjk_members")
public class YjkMembers implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    private String memberId;
    private String mobilePhone;
    private String idType;
    private String identityNum;
    private String memberName;
    private String sex;
    private LocalDate birthday;
    private Double height;
    private Double weight;
    private String imId;
    private String imToken;
    private String wechatOpenId;
    private String wechatUnionId;
    private String wechatNickname;
    private String wechatAvatarUrl;
    private String userAppOpenId;
    private String memo;
    private Integer levelId;
    private String doctorId;
    private String doctorAssistantId;
    private String inviteCode;
    private Instant packageExpireTime;
    private String selfSelectedTag;
    private String recordState;
    private Instant createTime;
    private String creatorId;
    private String creatorName;
    private Instant modifyTime;
    private String modifierId;
    private String modifierName;
    private String wxCountry;
    private String wxProvince;
    private String wxCity;
    private String avatarId;
    private String companyName;
    private String channelId;
    private Integer familyNumberLimit;
    private Integer examDeviceRelated;
    private String healthMemberId;
    private String recordId;
    private String recordNo;

    @OneToMany(fetch = FetchType.EAGER)
    @JoinColumn(name = "memberId")
    private Set<YjkDmPackage> packages;

    @OneToMany(fetch = FetchType.EAGER)
    @JoinColumn(name = "memberId")
    private Set<YjkPackageItems> packageItems;
}
